
package org.openeai.lite.console.actionhandlers;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import org.apache.log4j.Logger;
import org.openeai.lite.common.exception.OpenEAIException;


@ManagedBean(name = "templateActionHandler")
@RequestScoped
public class TemplateActionHandler
{

    @SuppressWarnings("unused")
    private static Logger log = Logger.getLogger(TemplateActionHandler.class);

    // Properties
    private String message;

    public String getMessage()
    {
        return this.message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public void dummyAction() throws OpenEAIException
    {
        try
        {
            // Do something
            setMessage("Dummy action complete.");
        }
        catch (Exception e)
        {
            setMessage("Error doing something");
            throw new OpenEAIException(e);
        }
    }
}
